package service.auth.impl;

import java.util.Map;

import model.auth.Roles;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import service.auth.RolesService;
import core.base.page.Page;
import core.base.page.PageRequest;
import dao.auth.RolesDao;

@Service("auth.RolesService")
public class RolesServiceImpl implements RolesService {

	@Autowired
	@Qualifier("auth.RolesDao")
	private RolesDao rolesDao;

	public int deleteById(Long id) {
		return rolesDao.deleteById(id);
	}

	public Roles getById(Long id) {	
		return rolesDao.getById(id);
	}

	public void insert(Roles model) {
		rolesDao.insert(model);
	}

	public Page<Roles> queryForPage(PageRequest<Map> pageReq) {
		Page<Roles> page = rolesDao.queryForPage(pageReq);
		return page;
	}

	public void setRolesDao(RolesDao rolesDao) {
		this.rolesDao = rolesDao;
	}

}
